package br.com.halyson.pontoeletronico.adapter;

import br.com.halyson.pontoeletronico.view.PontoActivity;
import br.com.halyson.pontoeletronico.view.RegistrosActivity;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class ViewPagerAdapter extends FragmentPagerAdapter
{
    
    final int PAGE_COUNT = 2;
    
    public ViewPagerAdapter(FragmentManager fm)
    {
        super(fm);
    }
    
    @Override
    public Fragment getItem(int arg0)
    {
        switch (arg0)
        {
        case 0:
            PontoActivity pontoActivity = new PontoActivity();
            return pontoActivity;
            
        case 1:
            RegistrosActivity registros = new RegistrosActivity();
            return registros;
        }
        return null;
    }
    
    @Override
    public int getCount()
    {
        return PAGE_COUNT;
    }
    
}